/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MainUtama;

import FrameSekretariat.SekreLogin;
import FrameUser.UserLogin;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

/**
 *
 * @author WIN7
 */
public class MainUtama extends JFrame {

    private JLabel label, keluar;
    private JButton tombolSekre, tombolUser, tombolkeluar;

    public MainUtama() {
        this.setTitle("Sekretariat Utama");
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setBounds(460, 325, 300, 180);
        this.setLayout(null);

        label = new JLabel("Masuk Sebagai :");
        label.setBounds(95, 10, 120, 25);
        this.add(label);

        tombolSekre = new JButton("Sekretariat");
        tombolSekre.setBounds(25, 40, 110, 30);
        this.add(tombolSekre);
        tombolSekre.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                SekreLogin login = new SekreLogin();
                login.setVisible(true);
            }
        });

        tombolUser = new JButton("User");
        tombolUser.setBounds(150, 40, 110, 30);
        this.add(tombolUser);
        tombolUser.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                UserLogin login = new UserLogin();
                login.setVisible(true);
            }
        });
        
        keluar = new JLabel("Keluar :");
        keluar.setBounds(120, 75, 120, 30);
        this.add(keluar);
        
        tombolkeluar = new JButton("EXIT");
        tombolkeluar.setBounds(103, 105, 70, 25);
        this.add(tombolkeluar);
        tombolkeluar.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });
    }

    public static void main(String[] args) {
        MainUtama mu = new MainUtama();
        mu.setVisible(true);
    }
}
